Microcontroller interface with hall element

ABSTRACT

A device controller system incorporates an inexpensive Hall element to detect motion of a brushless DC motor. A magnet, which is part of a motor rotor, passes by the Hall element producing a Hall voltage each rotation. The Hall voltage is coupled through an interface port to a comparator within a process controller. A microprocessor within the process controller calculates a control response based on a comparator output signal. The interface port is rapidly reconfigured to provide signals produced from the control response as output to device drivers on the same input-output pins that receive the Hall voltage. The device drivers produce a current through fan coils producing an update in the magnetic field of each motor phase which updates the speed of the fan according to programming within the process controller. Rapid configuring and reconfiguring of the interface port allows all necessary components of the controller system to be used with a single rotational commutation cycle.

TECHNICAL FIELD

The present invention relates to interfacing a controller to a Hallelement and device drivers. More specifically, a microcontroller andcomparator are interfaced to a Hall effect sensor to measure a Hallvoltage and to produce signals to a device driver over the sameinterface port pins.

BACKGROUND ART

There is continual need to improve response time and resolution incontrolling the movement of devices where a controller and feedback loopare incorporated. In these situations, controllers are interfaced withdevices and combinations of sensors and device drivers to compose anoverall feedback loop. A controller initiates a certain action on adevice through the driver circuit, a sensor circuit acquires informationregarding how the device has responded to the drive input, and amodified new drive input is calculated. This type of control loop iswidely pursued in brushless DC motor (BLDC) commutation and in systemsincorporating fans being driven by these motors.

Hall effect sensors are part of a technology application incorporating amagnet on the device being controlled. The Hall effect sensor is used todetect the proximity of a magnetic field coming from the magnet andtherefore providing information about a location and movement of thedevice the magnet is attached to. For example, controlling the speed ofa fan connected as part of a DC brushless motor is highly desirable.Maintaining a speed relative to a temperature sensed in the fan'senvironment and adjusting the speed for maintaining a constanttemperature is a technique frequently used.

With reference to FIG. 1, a type of Hall effect sensor, known as a Halldevice 125, is powered by connections to a supply voltage V_(DD) 110 andground 112 within a device controller system 100. The Hall device 125incorporates additional devices and circuitry beyond an elemental Hallsensor to provide current and voltage sensing capability in a singlecomponent. A controller 105 is connected to power between supply voltageV_(DD) 110 and ground 112. The controller 105 conducts the generalprocesses of the system. The Hall device 125 has a Hall device outputpin 150 connecting to a controller input pin 135.

Each of two output pins 140 a and 140 b of the controller 105 connectsto a control input of a device driver 120 a and 120 b. Each of twodevice drivers 120 a and 120 b contains a drive resistor 122 a and 122 band a drive transistor 124 a and 124 b. Each of two drive resistors 122a and 122 b connects between an input of a device driver 120 a and 120 band a base terminal of the corresponding drive transistor 124 a and 124b. Each emitter terminal of the drive transistors 124 a and 124 bconnects to ground 112. Each of two fan coils 130 a and 130 b connectsbetween a fan power supply 115 and a collector terminal of a respectivedrive transistor 124 a and 124 b. Each fan coil 130 a and 130 b relatesto one phase of a brushless DC (BLDC) motor (not shown).

The brushless DC motor has magnetic poles associated with a rotor (notshown). During rotation, the magnetic poles of the rotor pass by theHall device 125, each creating a Hall voltage pulse on the Hall deviceoutput pin 150. For a two-phase motor, two pulses will be produced onthe Hall device output pin 150 for each rotation of the motor. The Hallvoltage pulse is used as input to the controller 105 as part of acommutation scheme for the motor. During the first portion of thebrushless DC motor commutation cycle, the Hall voltage pulse is coupledto the controller 105 through the controller input pin 135. The Hallvoltage pulse switches between 0 V (volts) and V_(DD) 110 in response tovariations of the associated fields from the magnetic rotor poles. Thetoggling of the Hall voltage pulse is used in combination withprogramming within the controller 105 as part of the commutation schemeto control the speed of the fan.

The commutation scheme uses a change in the Hall voltage pulse totrigger an interrupt programming routine operating within the controller105. The interrupt routine interrogates a timer that has been countingup since a last change in the Hall voltage pulse. According to how muchtime has elapsed since the last change in Hall voltage pulse, and takinginto account the rising or falling transition of the present change inthe Hall voltage pulse, the controller 105 will produce fan coil controlsignals at the port pins 140 a and 140 b. The fan coil control signalsare coupled to the device drivers 120 a and 120 b where they produce abase voltage at the base terminal of the driver transistors 124 a and124 a. Changes in the base voltage on the driver transistors 124 a and124 b vary the amount of current conducted through the fan coils 130 aand 130 b. The varying current, in turn, modulates the magnetic field inthe coils controlling the respective phases of the brushless DC motor.By varying the timing and duration of the fan coil control signals, thecontroller 105 will maintain or change the fan speed according torequirements of the programming.

Presently, the use of a Hall device 125 means that in addition to anelemental Hall sensor, devices and circuitry are incorporated in thedevice to provide current and voltage sensing capability in a singlecomponent. The additional circuitry causes the Hall device 125 to costsignificantly more than the elemental Hall sensor. Additionally, thecontroller 105 contains additional components and circuitry capable ofmeasuring signals and voltages. Presently, not all of the measuringcomponents in the device controller system 100 are incorporated in themeasurement process. A typical device controller system 100, therefore,may contain components with costly additional measurement circuitry,while at the same time, the system may have measurement componentsavailable that are going unused. It would be desirable for a devicecontroller system 100 to be able to use a less expensive Hall sensor andat the same time incorporate any components already available within thesystem to measure the Hall voltages produced and provide a morecost-effective commutation scheme.

SUMMARY

A device controller system incorporates a Hall element to determine aposition or orientation of a magnet on a moving device being controlled.A typical device being controlled is a brushless DC motor. The systemcontains a process controller that can be coupled through an interfaceport to receive a Hall voltage from the Hall element. Unlike the priorart, a comparator within the process controller receives the Hallvoltage for measurement. The Hall voltage is received on the sameprocess controller port pins as those used to provide output controlsignals to drive a device. This saves one process controller port pinthat was formerly dedicated as a Hall device input pin. The comparatoroutput signal is available to direct either software program flow orinterrupt select logic in a microprocessor.

Based on the comparator output signal, a control response is calculatedby the microprocessor. The control response is a set of signals that areapplied to device drivers for driving fan motor coils. A most recentcontrol response produces current in the motor coils to maintain orchange the motor speed based on the programming being executed by theprocess controller. The Hall element senses the ensuing motion of thedevice (from movement of a magnetic field past the sensor) and theresulting Hall voltage is able to trigger the process again.

The process controller configures an interface port to receive the Hallvoltage from the Hall element in a first portion of a fan commutationcycle. The comparator is coupled to the Hall element for measurement ofthe Hall voltage. The processor calculates the control response and theinterface port is reconfigured to allow control response signals to bepropagated to device drivers. In a second portion of the fan commutationcycle, the device driver transistors produce a current through the fancoils. Configuring of the interface port to either receive or sendsignals to various system elements allows the device control process tobe completed with the elements already available in the processcontroller. Effective use of available system elements, such as thecomparator and analog-to-digital converter, a reduction of other systemelements, such as a dedicated Hall device pin, along with an ability toincorporate a low cost Hall element, provide an economical devicecontroller system.

The present invention is also a method of controlling a device where aHall effect sensor is coupled to an interface port. A Hall voltage isproduced on the Hall effect sensor by movement of a magnetic fieldassociated with the device. A comparator is coupled to the interfaceport for receiving and measuring the Hall voltage. A control response iscalculated according to the output of the comparator measurement.Control response signals are coupled to the device drivers to control adevice incorporating a magnet.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram of a prior art device controller systemfor an electric motor, or the like, incorporating a Hall device andcontroller.

FIG. 2 is a schematic diagram of an exemplary embodiment of the presentinvention incorporating a Hall element and process controller to controlan electric motor, or the like.

FIG. 3 is a logic block diagram of an exemplary embodiment of aconfigurable interface port for interface port pins in the processcontroller of FIG. 2.

FIG. 4 is a process flow diagram of an exemplary embodiment of thepresent invention incorporating a Hall effect sensor configured tocontrol a device including a magnet for position indication.

FIG. 5 is a process flow diagram of an exemplary embodiment of thepresent invention incorporating a Hall element coupled with a comparatorto vary a pulse width modulation signal in controlling a device.

DETAILED DESCRIPTION

With reference to FIG. 2, a Hall effect sensor, instantiated as a Hallelement 225 in the present exemplary embodiment, is powered byconnections to V_(DD) 210 and ground in a device controller system 200.The Hall element 225 is less expensive than the Hall device 125 (FIG.1). The Hall device 125 incorporates additional devices and circuitry toprovide current and voltage sensing capability in a single componentthat the Hall element 225 does not. The Hall element 225 provides Hallelement output pins 250 a and 250 b for electrical connection. The Hallelement output pins 250 a and 250 b connect to Hall element resistors255 a and 255 b. The Hall element resistors 255 a and 255 b provide acurrent limiting capability between the Hall element output pins 250 aand 250 b and interface port pins 240 a and 240 b of a processcontroller 205 while providing a two-phase output signal on the twopins. Values for the Hall element resistors 255 a,b may be selectedfrom, for example, 470 ohms to 2 kilo ohms (k ohms). The Hall elementresistors 255 a,b limit a magnitude of current entering into the Hallelement output pins 250 a,b from reaching undesirable levels. When theinterface port pins 240 a,b are at a high logic level, (i.e., a logiclevel 1), an output voltage level may be, for example, from 2.0 to 5.0volts. Without the Hall element resistors 255 a,b limiting a resultingcurrent, damage to the Hall element 225 would occur.

The process controller 205 contains a microprocessor (not shown) toexecute instructions, calculate a control response, and configureconnections between the interface port pins 240 a and 250 b and otherelements of the device controller system 200. The microprocessor is alsocommonly known as a microcontroller. The process controller 205 isconnected to power between V_(DD) 210 and ground.

Each interface port pin 240 a and 240 b connects to a control input of adevice driver 220 a and 220 b. Each device driver 220 a and 220 bcontains a drive resistor 222 a and 222 b and a drive transistor 224 aand 224 b. Each drive resistor 222 a and 222 b connects between an inputof the device driver 220 a and 220 b and a base terminal of thecorresponding drive transistor 224 a and 224 b for handling thedifferent output phases. Selected values for the drive resistors 222 a,bmay range, for example, from 1 k to 10 k ohms. Each emitter terminal ofthe drive transistors 224 a and 224 b connects to ground. Each fan coil230 a and 230 b connects between a fan power supply 215 and a collectorterminal of the respective drive transistor 224 a and 224 b. Each fancoil 230 a and 230 b relates to one phase of a brushless DC (BLDC) motor(not shown).

The brushless DC motor has magnetic poles associated with a rotor (notshown). During rotation, the magnetic poles of the rotor pass by theHall element 225 creating a Hall voltage across the Hall element outputpins 250 a and 250 b. The microprocessor configures the interface portpins 240 a and 240 b to receive input signals during a first portion ofa commutation cycle of the brushless DC motor. The interface port pins240 a and 240 b are further configured to connect input signals to acomparator (explained infra). During the first portion of the brushlessDC motor commutation cycle, the Hall voltage is coupled to thecomparator through the configured interface port pins 240 a and 240 b.In this way the comparator is able to measure the Hall voltage andproduce a comparison signal output (not shown). The comparison outputsignal is available to other system elements and to the microprocessor.

The process controller 205 contains a microprocessor (not shown) thatcarries out execution of program code for the process controller 205. Areference to the process controller 205 carrying out a process step orproducing certain signals is synonymous to the microprocessor producingthe same action either by itself or in combination with other elementswithin the process controller 205. The microprocessor is programmed tocalculate a control response corresponding to the comparison signal. Thecontrol response is a set of signals produced by the microprocessor thatare used to control device drivers of the brushless DC motor (explainedinfra). The control response may be carried out as a result of themicroprocessor configuring the interface port pins 240 a and 240 b foreither an input or an output communication (i.e., bidirectionalcommunication) in combination with configuring a coupling of theinterface port to additional measuring elements within the processcontroller 205.

A microprocessor and related system elements constitute a processcontroller. A process controller is a microprocessor plus additionalelements required or capable of producing results necessary to perform aparticular process. Additional elements may be, for example, an A-to-Dconverter, an analog comparator, coder-decoder (CODEC), or universalasynchronous receiver transmitter (UART). A microprocessor plus acollection of such additional system elements within a single package orsystem is a process controller. For example, an Atmel® ATtiny13 8-bitAVR® microcontroller is a process controller where the microcontrolleris accompanied by a timer/counter with prescaler, an Analog-to-Digitalconverter, an internal voltage reference, a watchdog timer, anoscillator, and an analog comparator with in a plurality of possiblesingle package options. Depending on the level and timing of the Hallvoltage, adjustments in the control response are made to produce a fanspeed according to programming directives. The programming of themicroprocessor may be configured to maintain, for example, constantspeed or provide constant power to the motor.

In a second portion of a commutation cycle of the brushless DC motor,the microprocessor configures the interface port pins 240 a and 240 b tosend output signals (not shown). Each of the output signals areconnected through interface port pin 240 a and 240 b to a device driver220 a and 220 b. Within each device driver 220 a and 220 b a signalcorresponding to the control response is propagated through the driveresistor 222 a and 222 b and applied to the corresponding base terminalof the respective drive transistor 224 a and 224 b. According to thecontrol response programming of each motor phase, conduction of currentthrough the drive transistor 224 a and 224 b is increased or decreasedto produce more or less of a magnetic field within the fan coil 230 aand 230 b. The speed of rotation of the brushless DC motor is increasedor decreased according to the increase of decrease of current (andmagnetic field) in the pair of fan coils 230 a and 230 b. The resultingspeed of the brushless DC motor is reflected in the speed that themagnetic poles of the rotor pass by the Hall element 225. In this way, afeedback loop is completed and the process of controlling the brushlessDC motor continues in a subsequent commutation cycle of the motor.

With reference to FIG. 3, interface port pins 240 a and 240 b, of theprocess controller 205 (FIG. 2), connect to port configuration blocks310 a and 310 b within the process controller 205. Port configurationlines 355 a and 355 b connect from a data bus 365 to the portconfiguration blocks 310 a and 310 b. A number, n, of port configurationlines 355 a and 355 b provide signals from the microprocessor (notshown), through the data bus 365, to set up the configuration block 310a and 310 b to send or receive signals. Further connections to the portconfiguration blocks 310 a and 310 b are output data lines 315 a and 315b and input data lines 317 a and 317 b. Input data lines 317 a and 317 bconnect to first inputs of corresponding multiplexers 325 a and 325 b.Outputs of auxiliary sources 320 a and 320 b connect to second inputs ofthe corresponding multiplexers 325 a and 325 b. Auxiliary sources 320 aand 320 b, when used, are capable of containing, for example, a bandgapreference voltage source or additional multiplexers to provide couplingto other input signals or voltage sources (not shown). Multiplexerselect lines 330 a and 330 b connect from a configuration register 333to related multiplexers 325 a and 325 b. The configuration register 333connects to the data bus 365 to receive configuration signals from themicroprocessor.

An output from a first multiplexer 325 a connects to a positive input ofa comparator 335. An output from a second multiplexer 325 b connects toa negative input of the comparator 335. A comparator output 338 connectsto an interrupt selection logic block 345 and is input to a control andstatus register 340. A comparator interrupt output 348 also connectsfrom the interrupt selection logic block 345 to the control and statusregister 340. For example, a pair of interrupt mode select lines 343connects from the control and status register 340 to the interruptselection logic block 345. The pair of interrupt mode select lines 343provides signals that control that mode of comparator output signaltransition which trigger interrupts. For example, interrupts may beselected to be triggered by a rise, fall, or toggling of the signalproduced on the comparator output 338. Data in the control and statusregister 340, coming from the comparator 335 and the interrupt selectionlogic block 345, are available to the microprocessor over the data bus(not shown) for reading.

The output data lines 315 a and 315 b connect from a data register 316to the port configuration blocks 310 a and 310 b. The data register 316connects with the data bus 365 to receive signals from themicroprocessor for eventual propagation through the port configurationblocks 310 a and 310 b as output data.

During the first portion of the brushless DC motor commutation cycle, asmentioned supra, the microprocessor (not shown) produces portconfiguration signals through the data bus 365 and on to the portconfiguration lines 355 a and 355 b for configuring the portconfiguration blocks 310 a and 310 b. Each port configuration block 310a and 310 b is configured to couple an interface port pin 240 a and 240b to a first input of a multiplexer 325 a and 325 b through the inputdata lines 317 a and 317 b. The microprocessor produces configurationsignals on the data bus 365 that are provided to the configurationregister 333. Outputs from the configuration register 333 reproduce theconfiguration signals on the multiplexer select lines 330 a and 330 bthat select a path through the multiplexers 325 a and 325 b and couplethe signals on the set of first inputs of the multiplexers 325 a and 325b to the positive and negative inputs of the comparator 335.

With the interface port pins 240 a and 240 b configured to couple to thecomparator 335, the Hall voltage coming from the Hall element outputpins 250 a and 250 b (FIG. 2) is coupled to the comparator 335 formeasurement. The first portion of the brushless DC motor commutationcycle is configured by the microprocessor for obtaining and measuringthe Hall voltage. The microprocessor continues during this portion ofthe commutation cycle to calculate the control response.

The microprocessor is also capable of being programmed, for example, toselect an interrupt mode for the interrupt selection logic block 345.The microprocessor produces interrupt mode select signals on the databus 365 and propagates them (not shown) to the control and statusregister 340. The interrupt mode select lines 343 a and 343 b couple theinterrupt mode select signals from the control and status register 340to the interrupt select logic block 345. The interrupt mode selectsignals determine detection of a rising, falling, or toggling Hallvoltage.

During a second portion of the brushless DC motor commutation cycle, themicroporcessor produces signals through the data bus 365 and through theport configuration lines 355 a and 355 b. Signals received over the portconfiguration lines 355 a and 355 b configure the port configurationblocks 310 a and 310 b to couple the interface port pins 240 a and 240 bto the output data lines 315 a and 315 b. The set of signalsrepresenting the control response (explained supra) are routed throughthe data bus 365 and into the data register 316. The contents of thedata register 316 produce control response signals on the output datalines 315 a and 315 b which are routed through the port configurationblocks 310 a and 310 b to the interface port pins 240 a and 240 b.

In this way, signals representing the calculated control response comingfrom the microprocessor are propagated through the output data lines 315a and 315 b to the interface port pins 240 a and 240 b. Control responsesignals continue propagating through the device drivers 220 a and 220 band produce current in the fan coils 230 a and 230 b. The current in thefan coils 230 a and 230 b produce magnetic fields that rotate thebrushless DC motor. Although the Hall element 225 is not able todetermine a direction of rotation of the associated fan, themicroprocessor does command excitation of the fan coils 230 a,b based onsignals from the Hall element 225. A particular sequence of thesecommands under control of the microprocessor will result in eitherclockwise or counterclockwise rotation. According to programmingexecuted by the microprocessor, the control response may serve to speedup, maintain, or reduce the speed of the fan motor by adjusting currentin the fan coils 230 a and 230 b accordingly.

With reference to FIG. 4, an exemplary embodiment of a method forcontrolling a device according to the present invention commences withconfiguring 405 the interface port to receive signals. The methodcontinues with producing 410 a Hall voltage on a Hall effect sensor andmeasuring 415 the resulting Hall voltage. Next, a step of calculating420 a control response is taken followed by configuring 425 theinterface port to send signals. The method continues with producing 430control signals corresponding to the control response calculated supra.The method goes on with a step of changing 435 a device positionaccording to the control signals and changing 440 a magnetic fieldcorresponding to the change in position of the device. The methodcontinues with the step of measuring 415 the resulting Hall voltage andrepeating the process above in accordance with an overall device controlrequirement. A magnet attached to the device provides the magnetic fieldrepresenting changes in the device position.

With reference to FIG. 5, an exemplary embodiment of a method forcontrolling a device according to the present invention commences withinitializing 505 a controller followed by a further initializing 510 ofa pulse width modulation scheme and controller outputs. The methodcontinues with reading 515 analog control signals at a set of inputports and converting 520 analog signals to a digital representation. Themethod goes on with reading 525 a Hall voltage across a Hall elementwith a comparator. A next step is determining 530 an output level of thecomparator. In the case that the comparator output level is equal tozero, a next step is producing 535 a a pulse width modulated signal tothe phase 1 motor windings and returning to the step of reading 515analog control signals. In the case that the comparator output level isequal to one, a next step is producing 535 b a pulse width modulatedsignal to the phase 2 motor windings and returning to the step ofreading 515 analog control signals.

While examples have been presented of a microcontroller based interfacewith a Hall element, one skilled in the art would readily recognize thatmany different combinations of system elements and process steps may beincorporated to accomplish the same overall result of device control.For example, a microcontroller has been described as part of a processcontroller. One skilled in the art would recognize the equivalence ofvarious forms of processing capability. For example, the same programexecuting capabilities could be provided by an embedded RISCmicroprocessor or embedded controller (in combination with additionalsystem elements) that is able to accept interrupt requests and initiateor interrupt service routines (ISRs) in response.

Additionally, a Hall voltage measuring device has been demonstrated as acomparator. One skilled in the art would recognize that a differentialoperational amplifier, instrumental amplifier, analog-to-digitalconverter, or voltage level measuring device (comprised of bandgapbiased transistors and current mirrors) with references to anappropriate voltage level would accomplish the same result. While anexemplary embodiment of a two phased brushless DC motor controller hasbeen presented, one skilled in the art would readily conceive of acombination of multiple embodiments of the example presented supra whichwould be able to control a three phase motor for instance.

Furthermore, a brushless DC (BLDC) motor commutation scheme has beenexemplified. A similar interface port could be reconfigured to provideother measurement and drive capabilities. For instance, a currentmeasuring device related to a photo sensor could be coupled-to, througha configurable interface port, in a first portion of a systemcommutation cycle timeface. A magnitude of current measured by thesystem could correspond directly to a light intensity level received atthe photo sensor. In a second portion of the system commutation cycletimeframe, a pulse width modulated signal could be sent to an enginecontrolling throttle servo. In this way an aircraft propeller speedcould be sensed by the optical sensor and the speed of the enginerunning the propeller modified through servo control updates within eachcommutation cycle of the propeller.

1. A device controller, comprising: an interface port having at leasttwo pins; a Hall effect sensor coupled to the at least two pins of theinterface port; a process controller coupled to the interface port; acomparator coupled to the process controller and the interface port; adevice driver coupled to a rotating device and the at least two pins ofthe interface port; whereby the Hall effect sensor produces a Hallvoltage, the voltage coupled by the at least two pins of the interfaceport to the comparator to be measured in a first portion of acommutation cycle, the process controller obtaining a Hall voltage andcalculating a control response, the interface port coupling the processcontroller to the device driver in a second portion of a commutationcycle using the at least two pins, the device driver providing controlsignals to the rotating device according to the control response.
 2. Thedevice controller of claim 1, wherein both the Hall voltage is coupledto the comparator for measuring and the control signals are coupled tothe device driver for controlling through the same at least two pins ofthe interface port.
 3. The device controller of claim 1, wherein a firstvoltage from the Hall effect sensor indicates a first direction ofmotion and a second voltage from the Hall effect sensor indicates asecond direction of motion.
 4. The device controller of claim 1, whereinthe process controller is coupled to the interface port, the processcontroller having means for configuring propagation of signals throughthe interface port, coupling the comparator, the device driver, and theHall effect sensor to the interface port, configuring the comparator tomeasure the Hall voltage, and producing signals to the device driveraccording to the control response calculated.
 5. The device controllerof claim 1, wherein the device controlled is a multi-phase electricalmotor.
 6. A device controller, comprising: a Hall effect meansintegrated into the device controller for sensing a magnetic field andcapable of producing a Hall voltage output; a comparing means formeasuring the Hall voltage coupled to the Hall effect means andproducing a comparative signal; a processing means for calculating acontrol response coupled to the comparing means and receiving thecomparative signal; and an interface means, interposed between theprocessing means and the Hall effect means, for coupling and having thesame pins handling the Hall output voltage and the control response. 7.A motor controller comprising: a microprocessor having at least twoinput-output pins configured for bidirectional communication andconnected to a pair of driver lines configured to be coupled to a motor;a Hall effect sensor integrated into the motor controller and configuredto communicate Hall effect signals to the at least two input-output pinsof the microprocessor; whereby the microprocessor has means forconverting the Hall effect signals to motor control signals transmittedto the pair of driver lines using the at least two input-output pins. 8.The apparatus of claim 7, wherein the means for converting the Halleffect signals has an interface associated with the two input-outputpins, the interface comprising a comparator.
 9. The apparatus of claim7, wherein the means for converting the Hall effect signals furthercomprises an A-to-D converter.
 10. The apparatus of claim 7, wherein themicroprocessor is an AVR® microprocessor.
 11. The apparatus of claim 7,wherein the means for converting the Hall effect signals furthercomprises an interface port.
 12. The apparatus of claim 11, wherein theinterface port is configured by the microprocessor to receive Halleffect signals during a first phase of a commutation cycle of the motor.13. The apparatus of claim 11, wherein the interface port is configuredby the microprocessor to produce motor control signals during a secondphase of a commutation cycle of the motor.
 14. The apparatus of claim11, wherein the microprocessor has means for converting the interfaceport for input and for output during a single commutation cycle of themotor.
 15. The apparatus of claim 7, wherein the microprocessor hasmeans for calculating motor control signals relative to the Hall effectsignals received.
 16. The apparatus of claim 15, wherein themicroprocessor has means for calculating motor control signals tomaintain a constant rotational motor speed based on the Hall effectsignals received.
 17. The apparatus of claim 15, wherein themicroprocessor has means for calculating motor control signals tomaintain constant power to the motor based on the Hall effect signalsreceived.
 18. A method of controlling a device, comprising: producing aHall voltage on a Hall effect sensor integrated into a control device;configuring an interface port of the control device; using the Halleffect sensor and a comparator in the control device to produce ameasurement of the Hall voltage; producing a control signal within thecontrol device corresponding to the Hall voltage measurement; orientingthe device according to the control signal; and producing a change in amagnetic field.
 19. The method of controlling a device of claim 18,further comprising: producing a positional change in the deviceproportional to the control signal.
 20. The method of controlling adevice of claim 18, further comprising: producing a positional change inthe device inversely proportional to the control signal.
 21. A method ofcontrolling a device, comprising: coupling a Hall effect sensorintegrated into a control device to an interface port of the controldevice; producing a Hall voltage on the Hall effect sensor; coupling acomparator of the control device to the interface port; measuring theHall voltage; coupling a device driver to the interface port; andproducing a control signal to the device driver corresponding to theHall voltage.
 22. The method of controlling a device of claim 21,further comprising: producing a comparison signal corresponding to theHall voltage; and calculating a control response relating to thecomparison signal.
 23. The method of controlling a device of claim 21,further comprising: producing a positional change in the deviceproportional to the control signal; and producing a change in a magneticfield.
 24. The method of controlling a device of claim 21, furthercomprising: producing a positional change in the device inverselyproportional to the control signal; and producing a change in a magneticfield.
 25. A method of controlling a device, comprising: producing aHall voltage on a Hall effect sensor integrated into a device controllerin the presence of a magnetic field; coupling the Hall effect sensor toa comparator integrated into the device controller; measuring the Hallvoltage; producing a comparison signal; producing a control signalcorresponding to the comparison signal; coupling the control signal to adriver circuit; and configuring an interface port to couple the Halleffect sensor, the comparator, and the driver circuit.
 26. The method ofcontrolling a device of claim 25, further comprising calculating acontrol response relating to the comparison signal.
 27. The method ofcontrolling a device of claim 25, further comprising: producing apositional change in the device proportional to the control signal; andproducing a change in the magnetic field.
 28. The method of controllinga device of claim 25, further comprising: producing a positional changein the device inversely proportional to the control signal; andproducing a change in the magnetic field.